package iosr11.data;

import java.util.List;

public class Teacher extends Entity{

	private User user;
	private List<String> groups;
	private boolean isLecturer;
	
	public Teacher(){
		this.user=new User();
	}
	
	public Teacher(User user){
		this.user = user;
	}
	
	public Teacher(String id, User user, List<String> groups, boolean isLecturer){
		super(id);
		this.user = user;
		this.groups=groups;
		this.isLecturer=isLecturer;
	}
	
	public String getName() {
		return user.getName();
	}
	public void setName(String name) {
		this.user.setName(name);
	}
	public String getEmail() {
		return user.getEmail();
	}
	public void setEmail(String email) {
		this.user.setEmail(email);
	}
	public List<String> getGroups() {
		return groups;
	}
	public void setGroups(List<String> groups) {
		this.groups = groups;
	}
	public boolean isLecturer() {
		return isLecturer;
	}
	public void setLecturer(boolean isLecturer) {
		this.isLecturer = isLecturer;
	}
	
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String toString(){
		StringBuffer buf = new StringBuffer();
		buf.append("Dane nauczyciela:\n");
		buf.append("Id: ");
		buf.append(this.getId());
		buf.append("\n");
		buf.append("Nazwisko Imie: ");
		buf.append(user.getName());
		buf.append("\n");
		buf.append("E-mail: ");
		buf.append(user.getEmail());
		buf.append("\n");
		buf.append("Wykladowca: ");
		buf.append(isLecturer);
		buf.append("\n");
		return buf.toString();
	}
	
}
